package com.dodalizer.parser.method;

import org.apache.commons.lang.ArrayUtils;

import com.dodalizer.parser.comment.Comment;
import com.dodalizer.parser.param.Param;

abstract class Method {

    private Comment comment;

    private String returnType;

    private String name;

    private Param[] parameters;

    private String code;

    public Comment getComment() {
        return comment;
    }

    public void setComment(Comment comment) {
        this.comment = comment;
    }

    public String getReturnType() {
        return returnType;
    }

    public void setReturnType(String returnType) {
        this.returnType = returnType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Param[] getParameters() {
        return parameters;
    }

    public void setParameters(Param[] parameters) {
        this.parameters = parameters;
    }

    public void addParameter(Param parameter) {
        ArrayUtils.add(parameters, parameter);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
